// 该文件负责所有的公共组件的全局注册、

import PageTools from './PageTools'
// 导入excel相关组件
import UploadExcel from './UploadExcel'
// 导入上传头像组件
import ImageUpload from './ImageUpload'
// import store from '@/store'
// 导入日历组件
import WorkCalendar from './work-calendar'
// 导入全屏组件
import ScreenFull from './ScreenFull'
// 换主题是组件
import ThemePicker from './ThemePicker'
// 导入切换英文组件
import Lang from './Lang'
// tab页的视图引入
import TagsView from './TagsView'
export default {
  install(Vue) {
    Vue.component('page-tools', PageTools)
    Vue.component('upload-excel', UploadExcel)
    Vue.component('ImageUpload', ImageUpload)
    Vue.component('work-calendar', WorkCalendar)
    Vue.component('screen-full', ScreenFull)
    Vue.component('theme-picker', ThemePicker)
    Vue.component('lang', Lang)
    Vue.component('TagsView', TagsView)
    // 按钮权限放方法到原型中
    // Vue.prototype.checkPermission = function(key) {
    //   // key标识
    //   // 获取到vuex中的数据
    //   const points = store.state.user.userInfo.roles.points
    //   return points.includes(key)
    // }
  }
}
